package com.ruan.controller;

import com.ruan.pojo.Goods;
import com.ruan.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName:GoodsController
 * @Author:阮昇
 * @Description:
 * @Datetime: 2023/6/19 19:20
 **/
@RestController
@RequestMapping("/goods")
public class GoodsController {

    @Autowired
    private GoodsService goodsService;

    @RequestMapping("/getGoodsById/{id}")
    public Goods getGoodsById(@PathVariable Integer id){
        return goodsService.getGoodsById(id);
    }

}
